"use strict";
cc._RF.push(module, '65190se/TJEoqBXOTLv8jep', 'extension');
// eazax-ccc/extensions/extension.ts

// 类型扩展
// @see extension.ts https://gitee.com/ifaswind/eazax-ccc/blob/master/extensions/extension.ts
String.prototype.clamp = function (start, threshold, suffix) {
    if (suffix === void 0) { suffix = '...'; }
    if (this.replace(/[^\x00-\xff]/g, 'xx').length <= threshold)
        return this;
    var charCount = 0;
    var result = '';
    for (var i = start; i < this.length; i++) {
        charCount += /[^\x00-\xff]/.test(this[i]) ? 2 : 1;
        if (charCount > threshold)
            return result += suffix;
        result += this[i];
    }
    return result;
};
// String.prototype.translate = function () {
//     // TODO
//     return this;
// };

cc._RF.pop();